import { h,render} from 'vue'
import messageComponent from './index.vue'
export const message = (type,content,duration= 3000)=>{
    const messageInstance = h(messageComponent,{
        type,
        content,
        duration,
        destory:()=>{
            render(null,document.body)
        }
    })
    render(messageInstance,document.body)
}